﻿package Engine.error
{
    import flash.utils.*;

    public class RMIErrorCode extends Object
    {
        private static var _map:Dictionary = new Dictionary();
        public static const ExceptionCodeRMI:int = 20000;
        public static const ExceptionCodeNotSupported:int = 20001;
        public static const ExceptionCodeInvoke:int = 20002;
        public static const ExceptionCodeTimeOut:int = 20003;
        public static const ExceptionCodeConnectionNotConnect:int = 20004;
        public static const ExceptionCodeConnectionClosed:int = 20005;
        public static const ExceptionCodeConnectionWrite:int = 20006;
        public static const ExceptionCodeObjectNotExist:int = 20007;
        public static const ExceptionCodeOperationNotExist:int = 20008;
        public static const ExceptionCodeNotInstantiation:int = 20009;
        public static const ErrorDb_PlayerIdError:int = 32000;
        public static const ErrorDb_PlayerCreateUserNameExsit:int = 32001;
        public static const ErrorDb_PlayerCreateRoleNameExsit:int = 32002;
        public static const ErrorLogin_NeedLoginFromPlatform:int = 33000;
        public static const ErrorLogin_NoRole:int = 33001;
        public static const ErrorLogin_RoleNameIsToLong:int = 33002;
        public static const ErrorLogin_CreateRoleNameError:int = 33003;
        public static const ErrorLogin_CreateRoleDataError:int = 33004;
        public static const ErrorLogin_UserNameError:int = 33005;
        public static const ErrorGate_LoginNotLogin:int = 35003;
        public static const ErrorGate_LoginIsLogin:int = 35004;
        public static const ErrorGate_OperNotCD:int = 35005;
        public static const ErrorLogin_ErrorCodeVersion:int = 33006;

        public function RMIErrorCode()
        {
            return;
        }// end function

        public static function isInError(param1:int) : Boolean
        {
            return param1 in _map;
        }// end function

        public static function getErrorByCode(param1:int) : String
        {
            return _map[param1];
        }// end function

        public static function get map() : Dictionary
        {
            return _map;
        }// end function

    }
}
